# 查找字符串


str1 = "abcdefg"
str2 = "xdef"

# 返回下标索引,找不到会返回-1
t = str1.find(str2)
print(t)
